A band across the middle of the screen, and the words slide through it: full size on the middle line, then shrinking faster and faster toward the top and bottom of the band, and gone outside it. It is the shape of the WARNING word in a boss introduction: at depth 3 the band is exactly 64 rows tall (32 rows above the middle line and 32 below it), and the size drops with the square of the distance. depth is how tall the band is: 1 is 128 rows, 2 is 96, 3 is 64, 4 is 48, 5 is 32 and 6 is 24. Draw it together with screen_contrast to get the whole effect.
Works differently on Game Boy - The Game Boy shows a TEXT_BAND text only while its middle is inside the band, whole and at full width: it does not shrink toward the edge of the band (24 letters at most, drawn with sprites).
Works differently on Game Boy Color - The Game Boy Color shows a TEXT_BAND text only while its middle is inside the band, whole and at full width: it does not shrink toward the edge of the band (24 letters at most, drawn with sprites).
Sega Genesis: not built yet
On other consoles this differs: see Side by side and How the consoles differ.
TEXT_BAND: constantNames the band, a shape for draw_text_3d and draw_text_3d_anchored (and draw_text_3d_scaled). It is the shape of the WARNING word in a boss introduction: a narrow band across the middle of the screen, with the words sliding through it. On the middle line the words are full size and flat. A little way up or down they shrink, faster and faster, and at the edge of the band they are gone.
Like TEXT_DRUM, the band belongs to the screen, not to the words: you move the words with y, and the band stays where it is. It is a different shape from the drum, though, and the difference is the whole point:
TEXT_DRUM | TEXT_BAND | |
|---|---|---|
| how tall the lens is | 92 to 200 rows | 24 to 128 rows (64 rows at depth 3) |
| where the middle is | on row 80 | between row 80 and row 81 |
| how big a word still is 20 rows from the middle (drum at depth 6, band at depth 3) | about 81% of full size | about 58% of full size |
(The band is the tighter of the two: at depth 3 the words have closed up completely 32 rows from the middle, and the drum's tightest setting is still half size there.) The size drops with the square of the distance from the middle, just like the drum, and the numbers are copied from a real boss introduction: at k rows from the middle the size is about 1 - 0.00098 * k * (k + 1).
depth is a whole number from 1 to 6 and it sets how tall the band is, in rows above and below the middle:
| depth | the band reaches | how tall it is |
|---|---|---|
| 1 | 64 rows each way | 128 rows, most of the screen |
| 2 | 48 rows | 96 rows |
| 3 | 32 rows | 64 rows. This is the original boss introduction's own band |
| 4 | 24 rows | 48 rows |
| 5 | 16 rows | 32 rows, about one line of the big font |
| 6 | 12 rows | 24 rows |
A number outside 1 to 6 is held to the nearest end, and 0 draws plain, flat text.
The band alone only shrinks the word. The reason a boss introduction like this hits so hard is the second half: while the word crosses the middle, the whole screen's contrast goes up and then falls back, so the screen flashes as the word goes by. screen_contrast does that part. examples/rolling_text uses the band on its own, with a clock that keeps count of the sweeps and two options listed in its README; add screen_contrast to its Draw GUI event to get the flash as well.
draw_text_3d in a Draw GUI event, or draw_text_3d_anchored.draw_text_3d. The table is worked out in memory the first time it is used, so it adds nothing to the size of the game.SPRITE_BAND yet. The engine can draw a sprite with it, but no GBML name exists for it, so use TEXT_BAND for words.text_align(ALIGN_CENTER);
draw_text_3d(120, 80 + wave(-30, 30, 120, 0), "WARNING", TEXT_BAND, 3);A word that moves up and down through the band over and over (one trip up and back every two seconds). It is full size on the middle line and gone at the top and bottom of the band.
text_align(ALIGN_CENTER);
draw_text_3d(120, 80, "WARNING", TEXT_BAND, 3);The same word standing still on the middle line, where the band does nothing to it. Change the 80 and the word shrinks.